package cn.xinfei.xdecision.common.service.component.scorecard;

import cn.xinfei.xdecision.common.model.common.PageResult;
import cn.xinfei.xdecision.common.model.common.ResponseEntityDto;
import cn.xinfei.xdecision.common.model.component.CopyToFolderReqVo;
import cn.xinfei.xdecision.common.model.component.request.ListParam;
import cn.xinfei.xdecision.common.model.component.scorecard.Scorecard;
import cn.xinfei.xdecision.common.model.component.scorecard.vo.ScorecardVo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 评分卡(Scorecard) Service接口
 */
public interface ScorecardService extends IService<Scorecard> {

    // 新增
    Scorecard addScorecard(ScorecardVo scorecardVo);

    // 获取单个信息
    ScorecardVo getScorecardInfo(String scoreCardCode);

    // 修改
    void updateScorecard(List<Long> ids, Integer status, String errorMsg);

    // 修改状态（ids，status）
    void updateScorecardStatus(List<Long> ids, Integer status);

    void logicalDeleteScorecards(List<Long> ids);

    List<Long> queryByFolderId(@Param("folderId") Long folderId);

//    List<String> queryFieldEnByScorecardId(Integer scorecardId);

    // runner
    ScorecardVo queryExecuteScorecard(Long versionId);

    ScorecardVo queryById(Long id);

    ResponseEntityDto<PageResult<List<ScorecardVo>, Scorecard>> queryByEntity(ListParam listParam);

    Long checkAndSaveScorecard(ScorecardVo scorecardVo);

    void copyScorecard(CopyToFolderReqVo req);

    void saveScorecard(ScorecardVo scorecardVo);
}
